<%@ page language="java" contentType="text/html; charset="
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ include file="/WEB-INF/jsp/general/include_head.jsp"%>
<link href="../css/tablas.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="CONTAINER">
	<div class="header">
		<%@ include file="/WEB-INF/jsp/gesfutbol/head.jsp"%>
	</div>
	<div class="izquierda">
		<div class="izq_header"></div>
		<div class="izq_content">
			<%@ include file="/WEB-INF/jsp/usuari/menu_penya.jsp"%>	
		</div>
		<div class="izq_footer"></div>
	</div>

	<div class="derecha">
		<p>
			<a href="www.onlae.es">link a onlae,link a onlae, link a onlae,
				link a onlae, link a onlae, link a onlae, </a>
		</p>

		<hr />
	</div>
	<div class="principal">
		<h1>${penya.nom}</h1>
		<c:if test="${fn:length(llistaPenyistes) > 0}">
			<table cellpadding="5" class="lista">
				<tr class="even">
						<th>Nombre</th>
						<th>Rol</th>
				</tr>
				<c:forEach items="${llistaPenyistes}" var="penyista" varStatus="status">
					<tr class="<c:if test="${status.count % 2 == 0}">even</c:if>">
						<td>
							${ penyista.usuari.alies }	
						</td>
						<td>
							<c:if test="${ penyista.administra}">
								Administra
							</c:if>
							<c:if test="${ penyista.pronostica}">
								Pronostica
							</c:if>
							<c:if test="${ penyista.aporta}">
								Aporta
							</c:if>
						</td>
					</tr>	
				</c:forEach>
			</table>
		</c:if>
		
		<form:form action="updateRols.htm" commandName="rolUsuariBB" method="post">
			<form:hidden path="nomUsuari"/>
			<table>
				<c:forEach items="${rolUsuariBB.penyistes}" var="penyista" varStatus="status">
					<tr>
						<td>
							<form:hidden path="penyistes[${status.index}].idPenyista"/>						
							<form:input path="penyistes[${status.index}].usuari.alies" cssStyle='width:130px' disabled="true" />
						</td>
						<td>
							<form:checkbox path="penyistes[${status.index}].pronostica"/> Pronostica	
						</td>
						<td>
							<form:checkbox path="penyistes[${status.index}].administra"/> Administra
						</td>
						<td>
							<form:checkbox path="penyistes[${status.index}].aporta"/> Aporta
						</td>						
					</tr>
				</c:forEach>				
			</table>
			<input type="submit" value="Guardar">
		</form:form>
	</div>
	<div class="footer">
		<h6>
			<fmt:message key="copyright" />
		</h6>
	</div>
</div>
</body>
</html>